package AdminBD;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import adminHibernate.HibernateConnection;
import entidadesHibernate.Tramite;

public class DAOTramiteMySql implements DAOTramite {

	public void guardar(Tramite tramite) {
		Session session = HibernateConnection.conectar();
		
		try { 
			
			session.beginTransaction();			
			session.save(tramite);										
			session.getTransaction().commit();	
			
			}
		catch(HibernateException e) {
		       System.out.println(e);
		     } 
		finally { 
			session.close();
			}
		
	}

}
